package com.leng.common.core;

/**
 * @author xialin.yan
 * @version V1.0.1
 * @projectName shop
 * @packageName cn.dental360.common.web.base
 * @description  基础状态码，状态编码区分数字区段，方便同一类信息几种放置
 * @email xiaolin.yan@dental360.cn
 * @date 2019/10/24 13:38
 **/
public enum ApiStatusCode {

    ERROR(-1,"系统内部错误"),
    SUCCESS(0, "成功"),
    SAVE_UPDATE_FAILED(1, "部分数据操作未成功"),

    /**  登录相关的错误码50-100区间 **/
//    NO_LOGIN(51,"未登录"),
    WXA_NO_LOGIN(51,"请重新进行微信小程序登录"),
    SMS_ERROR(52,"短信验证码错误，请重新输入"),
    USERNAME_NOT_FIND(53,"账户未找到，请联系当地管理员！"),
    USERNAME_DISABLE(54,"账户被禁用，请联系当地管理员！"),

    /** 领取优惠卷模块 600-700**/
    COUPON_RECEIVE_FAIL(600,"优惠卷已被抢完啦")

    ;

    private int code;
    private String msg;

    ApiStatusCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    private void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    private void setMsg(String msg) {
        this.msg = msg;
    }
}
